Skip to content

Conversation

@svazquezco
Copy link
Collaborator

@svazquezco svazquezco commented Jan 2, 2026

Closes MPT-16657 MPT-16657

  • Add .coderabbit.yaml: introduces automated review configuration (profile, auto_review, incremental reviews, base_branches, labels, lifecycle toggles), pre-merge checks (docstrings, title, description modes, custom checks like Jira key presence, test coverage, commit count), finishing_touches and auto-prompting, path filters and path-specific instructions, knowledge_base preferences (web_search, code_guidelines, Jira integration), chat integration options, extensive per-tool linting/analysis toggles and tool-specific options, and project_keys (MPT).
  • Add .github/copilot-instructions.md: adds Python coding conventions and guidelines (naming, type hints, Google-style docstrings, PEP 8), linting/tooling preferences (ruff, flake8, wemake-python-styleguide), and pytest testing conventions and recommendations.
  • Remove .github/workflows/danger.yml: deletes the Danger CI workflow that ran on pull_request events.
  • No exported/public code entities modified; changes are configuration and documentation only.
  • Estimated review effort: Major (coderabbit config), Medium (Danger workflow removal), Low (documentation).

@svazquezco svazquezco requested a review from a team as a code owner January 2, 2026 12:47
@svazquezco svazquezco requested review from albertsola and d3rky and removed request for a team January 2, 2026 12:47
@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

📝 Walkthrough

Walkthrough

Adds a top-level CodeRabbit configuration file, a new Python copilot/style/testing guidance document, and removes a Danger GitHub Actions workflow. Verify config correctness, CI references, and that documentation matches repository conventions. (49 words)

Changes

Cohort / File(s) Summary
CodeRabbit configuration
/.coderabbit.yaml
New repository automation/config: review profile, auto_review/incremental settings, base_branches, labels, lifecycle toggles, pre-merge checks (docstrings/title/description modes, custom checks), finishing_touches, auto-prompting, path_filters/path-specific instructions, knowledge_base and chat integrations, Jira project_keys (e.g., MPT), and many tool enable/disable toggles and tool-specific options (ruff, markdownlint, yamllint, checkov, semgrep, eslint, pylint, etc.). Review for sensitive settings and path filter accuracy.
Copilot / CONTRIBUTING guidance
/.github/copilot-instructions.md
New guidance file (YAML front matter applyTo: **/*.py) covering general instructions, Python style/typing, packaging/pyproject notes, linting/tool preferences (ruff, flake8, wemake-python-styleguide), docstring/naming rules, and pytest-centered testing conventions (AAA, fixtures, parametrization, mocking guidance). Check consistency with existing project conventions.
Removed CI workflow
/.github/workflows/danger.yml
Deleted workflow that ran Danger on pull_request events (checked out PR head with fetch-depth 0 and executed one-danger). Verify no other automation depends on this workflow or its outputs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one properly formatted Jira issue key MPT-16657 at the beginning.
Test Coverage Required ✅ Passed The PR only modifies configuration files (.coderabbit.yaml, .github/copilot-instructions.md) and removes a workflow file (.github/workflows/danger.yml). No source code files in the mpt_tool/ directory are modified.
Single Commit Required ✅ Passed The pull request contains exactly one commit that combines all changes related to adding instructions and coderabbit configuration as a single logical unit.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Warnings
⚠️

This PR contains 2 commits.

Please squash them into a single commit to keep the git history clean and easy to follow.

Multiple commits are acceptable only in the following cases:

  1. One commit is a technical refactoring, and another introduces business logic changes.
  2. You are doing a complex multi-step refactoring (although in this case we still recommend splitting it into separate PRs).
⚠️

This PR modifies code (2 file(s)) but does not include any changes in the tests/ folder.

Please consider adding or updating tests to cover your changes.

✅ Found Jira issue key in the title: MPT-16657

Generated by 🚫 dangerJS against a82326e

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01a8f22 and e028be6.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • .github/.instructions.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
.github/.instructions.md

32-32: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
.coderabbit.yaml (3)

45-46: Verify the base_branches configuration aligns with your branching strategy.

The configuration enables auto-review for release/* branches in addition to the default branch. Ensure this matches your intended workflow, as this will trigger automatic reviews on all release branches.


173-176: Verify that the code guidelines file pattern is correct.

The configuration references .github/.instructions.md for code guidelines. Confirm that this file path matches the actual location of the instructions file being added in this PR.

This correctly links the CodeRabbit configuration to the coding conventions document, enabling enforcement during reviews.


181-184: LGTM! Jira integration properly configured.

The Jira knowledge base integration is correctly configured with the MPT project key, which aligns with the title requirement on line 59 expecting the MPT- prefix.

@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch from e028be6 to 4066c64 Compare January 2, 2026 13:34
@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch from e82a172 to f9ec233 Compare January 5, 2026 09:41
- Function and variable names must be explicit and intention-revealing.
- `pyproject.toml` is the source of truth for ruff and flake8 rules. Generated code must not violate those rules.
- Follow PEP 8 unless explicitly overridden by ruff.
- Prefer simple, explicit code over clever or compact implementations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you pls also add WPS rules here to follow + to use configuration from pyproject.toml for that

https://wemake-python-styleguide.readthedocs.io/en/latest/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@d3rky d3rky force-pushed the MPT-16657-add-coderabitt branch from f9ec233 to 50cca39 Compare January 5, 2026 10:03
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.coderabbit.yaml (2)

7-64: Configuration is valid and well-structured.

The review settings are properly configured. A few optional observations:

  • Line 21: Sequence diagrams are disabled. Enabling them can help visualize complex code flows in the walkthrough.
  • Lines 29-30: Suggested reviewers and auto-assignment are disabled. These features can improve team collaboration by automatically recommending appropriate reviewers.
  • Line 59: Title requirement for "MPT-" prefix aligns well with the Jira project key configuration on line 182.

65-158: Tools configuration is valid and comprehensive.

The tools section is properly configured with multiple Python linters enabled (ruff, flake8, pylint) and security scanning tools (gitleaks, semgrep) active. Past issues with config_file properties have been correctly resolved.

Consider verifying tool alignment with your tech stack:

  • Line 112: ESLint is disabled. If the project contains JavaScript/TypeScript files, consider enabling it.
  • Line 108: Checkov is disabled. If the project uses infrastructure-as-code files (Terraform, CloudFormation, etc.), consider enabling it for security checks.
📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9ec233 and 50cca39.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • .github/copilot-instructions.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/copilot-instructions.md
🔇 Additional comments (3)
.coderabbit.yaml (3)

1-6: LGTM! Configuration basics are well-structured.

The schema reference, language setting, and feature flags are all valid and properly configured.


160-166: LGTM! Chat settings are properly configured.

Auto-reply is enabled for convenience, and integration settings align with the knowledge base configuration (Jira auto-enabled, Linear disabled).


167-187: Excellent knowledge base configuration!

The knowledge base settings are well-configured with good integration between components:

  • Line 174: Code guidelines reference .github/copilot-instructions.md, which aligns with the other file being added in this PR.
  • Line 182: Jira project key "MPT" matches the title requirement prefix on line 59.
  • Web search and appropriate scope settings ensure comprehensive context for reviews.

@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch from 50cca39 to d2e4b88 Compare January 5, 2026 12:06
@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch 5 times, most recently from 6cebdf4 to a82326e Compare January 5, 2026 12:43
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.coderabbit.yaml (1)

69-107: Custom pre-merge checks are well-designed.

The three custom checks are properly configured and meet all schema requirements:

  • Clear, deterministic pass/fail criteria
  • Appropriate severity levels (error for Jira key requirement, warnings for best practices)
  • Comprehensive instructions with specific output formats

The checks effectively enforce your team's workflow requirements around Jira integration, test coverage, and commit hygiene.

💡 Optional: Consider formatting improvement for readability

Line 102 contains a very long instruction string. While valid, consider using YAML's block scalar style for better readability:

-          - Post: ⚠️ This PR contains X commits. Please squash them into a single commit to keep the git history clean and easy to follow. Multiple commits are acceptable only in the following cases: One commit is a technical refactoring, and another introduces business logic changes. You are doing a complex multi-step refactoring (although in this case we still recommend splitting it into separate PRs).
+          - Post: >-
+              ⚠️ This PR contains X commits. Please squash them into a single commit to keep the git history clean and easy to follow.
+              Multiple commits are acceptable only in the following cases:
+              One commit is a technical refactoring, and another introduces business logic changes.
+              You are doing a complex multi-step refactoring (although in this case we still recommend splitting it into separate PRs).
📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6cebdf4 and a82326e.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • .github/copilot-instructions.md
✅ Files skipped from review due to trivial changes (1)
  • .github/copilot-instructions.md
🔇 Additional comments (4)
.coderabbit.yaml (4)

116-117: ✅ Previous issues resolved!

Great work addressing the previous review feedback! Both the ruff (lines 116-117) and flake8 (lines 156-157) configurations have been corrected by removing the unsupported config_file properties. These tools will now rely on their automatic configuration file discovery, which is the recommended approach.

Also applies to: 156-157


1-7: LGTM - Basic configuration is well-structured.

The basic configuration is valid and properly formatted. The tone instructions align well with the goal of tracking resolved issues across commits.


12-17: Excellent Jira integration in summary instructions.

The high-level summary instructions are well-crafted to automatically extract and link Jira issues in the PR description. This will ensure consistent formatting and proper issue tracking across your PRs.


210-229: Knowledge base configuration is properly set up.

The knowledge base settings are well-configured:

  • Code guidelines enabled with default file patterns (which includes .github/copilot-instructions.md being added in this PR)
  • Jira integration properly enabled with the MPT project key, consistent with your custom checks
  • Appropriate use of auto scope for flexibility between public and private repositories

@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch from a82326e to 4f8ded0 Compare January 5, 2026 14:17
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.coderabbit.yaml (1)

2-2: Consider using a more specific language code.

The language is set to "en" which is valid, but the schema default is "en-US". Consider whether a specific locale like "en-US", "en-GB", or another variant better matches your team's preference.

📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a82326e and 4f8ded0.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/copilot-instructions.md
  • .github/workflows/danger.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/danger.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/copilot-instructions.md
🔇 Additional comments (5)
.coderabbit.yaml (5)

40-41: Verify the exclusion of .gitignore is intentional.

The path_filters configuration excludes .gitignore from reviews. This is unusual since .gitignore is typically either auto-excluded or would be included in reviews for consistency checks. Please confirm this exclusion is intentional for your workflow.


72-110: Well-structured custom pre-merge checks.

The three custom checks are clearly defined with appropriate modes and detailed instructions:

  • Jira issue key validation (error mode)
  • Test coverage reminder (warning mode)
  • Single commit enforcement (warning mode)

The instructions provide clear pass/fail criteria and user-friendly messaging.


111-204: ✅ Previous configuration issues resolved; tools configuration looks good.

The invalid config_file properties for ruff (previously at lines 73-75) and flake8 (previously at lines 114-116) have been successfully removed in commit 4066c64. Both tools now correctly use only the enabled property and will auto-discover their configuration files.

The tools configuration is well-structured:

  • Python linting suite enabled: ruff, flake8, pylint
  • Security scanning enabled: gitleaks, semgrep, osvScanner
  • Infrastructure tools enabled: yamllint, hadolint, actionlint, checkov disabled but others active
  • Language-specific tools appropriately disabled for non-applicable languages

205-212: Chat configuration is appropriate.

The chat settings are configured correctly:

  • Art disabled for cleaner output
  • Auto-reply enabled for better UX
  • Jira integration set to "auto" (enabled for private repos)
  • Linear integration disabled

213-232: Knowledge base configuration is well-aligned with project needs.

The knowledge base settings show good consistency with the project:

  • Jira integration explicitly enabled with MPT project key (line 227)
  • Matches the custom pre-merge check for MPT-XXXX issue keys (line 75)
  • Code guidelines enabled to use defaults including .github/copilot-instructions.md (line 219)
  • Web search enabled for enhanced context
  • Appropriate scope settings using "auto" for privacy-aware defaults

All settings are valid per schema.

@svazquezco svazquezco requested a review from d3rky January 5, 2026 15:09
@svazquezco svazquezco force-pushed the MPT-16657-add-coderabitt branch from 4f8ded0 to 8aac4e7 Compare January 5, 2026 15:18
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
.coderabbit.yaml (3)

42-44: Consider clarifying the formatting instruction.

The instruction "Do not suggest formatting changes or mention code formatting using Black. Instead use Ruff or Flake8" could be clearer since Ruff can format (like Black) while Flake8 only lints. Consider rewording to distinguish formatting from linting concerns.

🔎 Suggested clarification
      - path: "**/*.py"
        instructions: |
-          Do not suggest formatting changes or mention code formatting using Black. Instead use Ruff or Flake8
+          For formatting suggestions, prefer Ruff over Black. For linting concerns, use Ruff or Flake8.

87-99: Clarify what constitutes "code files" in the test coverage check.

The instruction checks if "code files" are modified but doesn't specify what qualifies as a code file (e.g., *.py, *.js, *.java). This ambiguity could lead to inconsistent results. Consider specifying file patterns or extensions that should trigger the test coverage requirement.

🔎 Suggested improvement
      - name: "Test Coverage Required"
        mode: "warning"
        instructions: |
-          Check if the PR modifies any code files but does not include changes in the tests/ folder.
+          Check if the PR modifies any code files (*.py, *.js, *.ts, etc.) but does not include changes in the tests/ folder.

          If code files are modified but no test files are changed:
          - Count the number of code files modified
          - Post: This PR modifies code (X file(s)) but does not include any changes in the tests/ folder. Please consider adding or updating tests to cover your changes.
          - Replace X with the actual number of files
          - Mark the check as FAILED

          If test files are included or no code files are modified:
          - Mark the check as PASSED

121-122: Consider the overlap between Python linting tools.

You have enabled three Python linters: Ruff (line 122), Flake8 (line 162), and Pylint (line 190). Ruff is a modern linter that already includes many Flake8 rules and is significantly faster. Running all three tools may produce redundant or conflicting feedback.

Consider keeping only Ruff enabled, or clearly document why multiple Python linters are necessary for your workflow.

Also applies to: 161-162, 189-190

📜 Review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f8ded0 and 8aac4e7.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/copilot-instructions.md
  • .github/workflows/danger.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/danger.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/copilot-instructions.md
🔇 Additional comments (1)
.coderabbit.yaml (1)

211-212: Verify Jira integration usage consistency.

The Jira integration has different settings in two places:

  • chat.integrations.jira.usage: auto (line 212) - enables only for private repositories
  • knowledge_base.jira.usage: enabled (line 227) - always enabled, even for public repositories

This difference may be intentional (e.g., you want Jira knowledge base for all repos but chat integration only for private ones), but please verify this is the desired behavior.

Also applies to: 226-227

@d3rky d3rky merged commit 298a755 into main Jan 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants